'use strict';

const RouterService = require('./base');

class BannerService extends RouterService {
  constructor(ctx) {
    super(ctx, 'ProductApplication');
  }

  pageOrder() {
    return [
        ['create_time', 'DESC']
    ];
  }

  listOrder() {
    return [
        ['create_time', 'DESC']
    ];
  }

    getPageInclude() {
        return [
            {
                model: this.ctx.model.Product,
                as: 'product',
            },
            {
                model: this.ctx.model.User,
                as: 'user',
            }
        ]
    }
    getOneInclude() {
        return this.getPageInclude()
    }
}

module.exports = BannerService;
